
unset PATH

MKDIR=/bin/mkdir
DATE=/bin/date
CP=/bin/cp
RSYNC=/usr/bin/rsync

DFMT=%Y%b%d%H%M
SNAPSHOT_DIRECTORY="/media/My\ Book/.snapshot"
SOURCE_DIRECTORY=/home

TSTAMP=`${DATE} +${DFMT}`
SNAPSHOT_0=${SNAPSHOT_DIRECTORY}/now
SNAPSHOT_1=${SNAPSHOT_DIRECTORY}/${TSTAMP}

${MKDIR} --parents ${SNAPSHOT_0}
${RSYNC} --archive --delete --delete-excluded --link-dest ${SNAPSHOT_0} ${SOURCE_DIRECTORY}/ ${SNAPSHOT_0}
${CP} --archive --link ${SNAPSHOT_0} ${SNAPSHOT_1}